package pl.pkolodziej.platform.service.course;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import pl.pkolodziej.platform.dao.course.CourseDAO;
import pl.pkolodziej.platform.vo.course.Course;

@Service
public class CourseServiceImpl implements CourseService {

	@Autowired
	public CourseDAO courseDAO;
	
	
	@Transactional
	public void addCourse(Course course) {
		courseDAO.addCourse(course);
	}
	
	@Transactional(readOnly=true)
	public List<Course> listCourses() {
		return courseDAO.listCourses();
	}

}
